<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //1. 把数字型转换为字符串型  变量.toString()
        var num=10;
        var str=num.toString();
        console.log(str);
        console.log(typeof str);
        //2.我们利用String()
        console.log(String(num));
        //3 利用+拼接字符串的方法实现转换效果 结果都是字符串
        console.log(num +'');
    </script>
</head>
<body>
    
</body>
</html>